package com.jxcq.gathering;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import util.IdWorker;

import java.text.SimpleDateFormat;
import java.util.Date;

@Slf4j
@EnableCaching
@EnableEurekaClient
@SpringBootApplication
public class GatheringApplication {

	public static void main(String[] args) {
		SpringApplication.run(GatheringApplication.class, args);
		log.info(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())+"Gathering服务启动完成并成功!!!!!!!!");
	}

	@Bean
	public IdWorker idWorkker(){
		return new IdWorker(1, 1);
	}
	
}
